-- GENERATED SPELL FOR [Balizar the Umbrage] --


function spell0_3899(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(14868,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3899', 30000, 1)
end

function spell1_3899(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(11980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3899', 655, 1)
end

function spell2_3899(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3899', 3000, 1)
end

function spell3_3899(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(11939,pUnit)
pUnit:RegisterEvent('Sorts_3899', 536, 1)
end

function Sorts_3899(pUnit, Event)
local choix_sorts_3899 = math.random(0, 3)
if choix_sorts_3899 == 0 then
pUnit:RegisterEvent('spell0_3899', 1, 1)
end
if choix_sorts_3899 == 1 then
pUnit:RegisterEvent('spell1_3899', 1, 1)
end
if choix_sorts_3899 == 2 then
pUnit:RegisterEvent('spell2_3899', 1, 1)
end
if choix_sorts_3899 == 3 then
pUnit:RegisterEvent('spell3_3899', 1, 1)
end
end

function mob3899_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3899', math.random(1500, 3000), 1)
end

function mob3899_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3899_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3899_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3899, 1, 'mob3899_Action')
RegisterUnitEvent(3899, 2, 'mob3899_Leave')
RegisterUnitEvent(3899, 3, 'mob3899_Kill')
RegisterUnitEvent(3899, 4, 'mob3899_Die')
